<extend name="_layout/main"/>
<block name="content">
    <div class="page-content">
        <div class="page-breadcrumbs">
            <ul class="breadcrumb">
                <li>
                    <i class="fa fa-home"></i>
                    <a href="{:U('dashboard/index')}">系统首页</a>
                </li>
                <li>
                    <a href="{:U('setting/index')}">系统设置</a>
                </li>
                <li class="active">默认参数</li>
            </ul>
        </div>

        <div class="page-body">
            <div class="row">
                <div class="col-xs-12 col-md-12">
                    <div class="widget">
                        <div class="widget-header bordered-bottom bordered-blue">
                            <span class="widget-caption">默认参数</span>
                        </div>
                        <div class="widget-body">

                            <form class="form-horizontal" role="form" action="{:U('setting/save')}" method="post"
                                  id="form">

                                <div class="form-group">
                                    <label class="col-sm-2 control-label no-padding-right">会员须知</label>
                                    <div class="col-xs-8">
                                        <div class="input-group col-xs-6">
                                            <textarea class="form-control" id="user_annouce" name="user_annouce" placeholder="会员须知"  rows="5">{$Think.config.setting.user_annouce}</textarea>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label no-padding-right">转账须知</label>
                                    <div class="col-xs-8">
                                        <div class="input-group col-xs-6">
                                            <textarea class="form-control" id="transfer_annouce" name="transfer_annouce" placeholder="转账规则"  rows="5">{$Think.config.setting.transfer_annouce}</textarea>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label no-padding-right">积分转待用须知</label>
                                    <div class="col-xs-8">
                                        <div class="input-group col-xs-6">
                                            <textarea class="form-control" id="integral_to_stored_annouce" name="integral_to_stored_annouce" placeholder="积分转待用规则"  rows="5">{$Think.config.setting.integral_to_stored_annouce}</textarea>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label no-padding-right">报单须知</label>
                                    <div class="col-xs-8">
                                        <div class="input-group col-xs-6">
                                            <textarea class="form-control" id="active_user_annouce" name="active_user_annouce" placeholder="报单规则"  rows="5">{$Think.config.setting.active_user_annouce}</textarea>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label no-padding-right">申请运营中心须知</label>
                                    <div class="col-xs-8">
                                        <div class="input-group col-xs-6">
                                            <textarea class="form-control" id="apply_operations_annouce" name="apply_operations_annouce" placeholder="申请运营中心须知"  rows="5">{$Think.config.setting.apply_operations_annouce}</textarea>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label no-padding-right">充值说明</label>
                                    <div class="col-xs-8">
                                        <div class="input-group col-xs-6">
                                            <textarea class="form-control" id="recharge_annouce" name="recharge_annouce" placeholder="充值说明"  rows="5">{$Think.config.setting.recharge_annouce}</textarea>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <button type="submit" class="btn btn-blue">保存</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</block>

<block name="footer">

    <script src="__PUBLIC__/assets/js/validation/bootstrapValidator.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
        $("#form").bootstrapValidator({
            excluded: [':disabled'],
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            submitHandler: function (validator, form, submitButton) {
                validator.defaultSubmit();
            },
            fields: {

                min_user_operations_amount: {
                    validators: {
                        notEmpty: {
                            message: '该项不能为空'
                        },
                        digits: {
                            message: '必须为数字'
                        }
                    }
                },
                min_user_active_amount: {
                    validators: {
                        notEmpty: {
                            message: '该项不能为空'
                        },
                        digits: {
                            message: '必须为数字'
                        }
                    }
                },
                min_operations_count: {
                    validators: {
                        notEmpty: {
                            message: '该项不能为空'
                        },
                        digits: {
                            message: '必须为数字'
                        }
                    }
                },

                pay_balance_percent: {
                    validators: {
                        notEmpty: {
                            message: '该项不能为空'
                        },
                        digits: {
                            message: '必须为数字'
                        },
                        between: {
                            min: 0,
                            max: 100,
                            message: '该数值在0 ~ 100之间',
                        }
                    }
                },
                pay_integral_percent: {
                    validators: {
                        notEmpty: {
                            message: '该项不能为空'
                        },
                        digits: {
                            message: '必须为数字'
                        },
                        between: {
                            min: 0,
                            max: 100,
                            message: '该数值在0 ~ 100之间',
                        }
                    }
                },
                active_unstore_integral_cycle: {
                    validators: {
                        notEmpty: {
                            message: '该项不能为空'
                        },
                        digits: {
                            message: '必须为数字'
                        },

                    }
                },
                active_unstore_integral_percent:{
                    validators: {
                        notEmpty: {
                            message: '该项不能为空'
                        },
                        digits: {
                            message: '必须为数字'
                        },
                        between: {
                            min: 0,
                            max: 100,
                            message: '该数值在0 ~ 100之间',
                        }
                    }
                },
                active_unstore_integral_multiple:{
                    validators: {
                        notEmpty: {
                            message: '该项不能为空'
                        },
                        digits: {
                            message: '必须为数字'
                        },
                        between: {
                            min: 0,
                            max: 100,
                            message: '该数值在0 ~ 100之间',
                        }
                    }
                },
                active_user_reward:{
                    validators: {
                        notEmpty: {
                            message: '该项不能为空'
                        },
                        digits: {
                            message: '必须为数字'
                        },
                        between: {
                            min: 0,
                            max: 100,
                            message: '该数值在0 ~ 100之间',
                        }
                    }
                },
                normal_to_stored_reward:{
                    validators: {
                        notEmpty: {
                            message: '该项不能为空'
                        },
                        digits: {
                            message: '必须为数字'
                        },
                        between: {
                            min: 0,
                            max: 100,
                            message: '该数值在0 ~ 100之间',
                        }
                    }
                }
            }
        });

    </script>
</block>